package bill.study.concurrency.confinement;

import java.util.Random;

public class ThreadLocal1 {

	// Define/create thread local variable
	static ThreadLocal threadLocal = new ThreadLocal();
	// Create class variable
	static volatile int counter = 0;


	// Displays thread local variable, counter,
	// and thread name
	public static void displayValues() {
		System.out.println(threadLocal.get() + "\t" + counter + "\t"
				+ Thread.currentThread().getName());
	}
}
	